imports('../../style/assign');

var user = require('./users');

return {
    main:renders({
        <form class="ui-form e-pt20 e-pb10">
            <div class="ui-item e-mt10">
                <label class="ui-label f-tac f-lh35">账套</label>
                <div class="f-fl">
                    <div class="f-clearfix">
                        <select name="accountid" class="f-dn" data-css="width:306px">
                            <%each accounts%>
                            <option value="<%$value.id%>"><%$value.name%></option>
                            <%/each%>
                        </select>
                    </div>
                    <div class="f-bb e-mt20"></div>
                    <div class="content">
                        <%include 'body'%>
                    </div>
                    <div class="e-mt20 f-clearfix">
                        <span class="j-add f-cblue f-cp">
                            <i class="iconfont">&#xe63a;</i>
                            <b class="e-mt-1 e-ml5">增加员工</b>
                        </span>
                    </div>
                </div>
            </div>
        </form>
    }),
    body:renders({
        <%each list%>
        <div class="f-clearfix e-mt20 choose-usersbox">
            <input type="hidden" name="id" value="<%$value.id%>">
            <dl class="ui-imitselect choose-users">
                <dt>
                    <span><strong><%$value.name%></strong></span>
                    <i class="iconfont">&#xe636;</i>
                </dt>
            </dl>
            <span class="users f-fl">
                <%if $value.empList??%>
                <%each $value.empList data%>
                <%include 'user'%>
                <%/each%>
                <%/if%>
            </span>
        </div>
        <%/each%>
    }),
    user:user
}